package com.foreknow.demo3;

public class Exampl {
    public static int[] Pop(int[] array){
        for(int i = 1;i < array.length;i++){
            for (int j = 0;j < array.length-i;j++){
                if (array[j]>array[j+1]){
                    int temp = array[j];
                    array[j] = array[j+1];
                    array[j+1] = temp;
                }
            }
        }
        return array;
    }
    public static void main(String[] args) {
        int[] arr = {112,34,54,76,12,4};
        Pop(arr);
        for (int i = 0;i<arr.length;i++){
            System.out.print(arr[i]+"\t");
        }
    }
}
